/*
 * MazeFactory.h
 *
 *  Created on: Jan 8, 2013
 *      Author: quanpv
 */

#ifndef MAZEFACTORY_H_
#define MAZEFACTORY_H_

//use shared pointer
#include <boost/shared_ptr.hpp>

#include "Maze.h"
#include "Wall.h"
#include "Room.h"
#include "Door.h"

class MazeFactory {
public:
	MazeFactory();
	virtual ~MazeFactory();

	virtual boost::shared_ptr<Maze> MakeMaze() const
	{
		boost::shared_ptr<Maze> aMaze(new Maze());
		return aMaze;
	}

	virtual boost::shared_ptr<Wall> MakeWall() const
	{
		boost::shared_ptr<Wall> aWall(new Wall());
		return aWall;
	}

	virtual boost::shared_ptr<Room> MakeRoom(int n) const
	{
		boost::shared_ptr<Room> aRoom(new Room(n));
		return aRoom;
	}

	virtual boost::shared_ptr<Door> MakeDoor(Room* r1, Room* r2) const
	{
		boost::shared_ptr<Door> aDoor(new Door(r1, r2));
		return aDoor;
	}

};

#endif /* MAZEFACTORY_H_ */
